package com.cuijq.ms.strategy.v1;

import java.io.FileInputStream;
import java.util.Properties;

/**
 * @author by CuiJQ
 * @Classname Application
 * @Description Application Description
 * @Date 2021/5/28 20:56
 */
public class Application {

  public static void main(String[] args) throws Exception {
    Strategy evictionStrategy = null;
    Properties props = new Properties();
    props.load(new FileInputStream("./config.properties"));
    String type = props.getProperty("eviction_type");
    evictionStrategy = StrategyFactory.getStrategy(type);
    UserCache userCache = new UserCache(evictionStrategy); //...

    //...
//    Strategy evictionStrategy = new ConcreteStrategyA();
//    UserCache userCache = new UserCache(evictionStrategy); //...
  }

}
